package com.zzc.legou.service.item.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.zzc.legou.core.service.impl.CrudServiceImpl;
import com.zzc.legou.item.entity.Sku;
import com.zzc.legou.service.item.service.ISkuService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SkuServiceImpl extends CrudServiceImpl<Sku> implements ISkuService {
    @Override
    public List<Sku> selectSkusBySpuId(Long spuId) {
        LambdaQueryWrapper<Sku> wrapper = Wrappers.lambdaQuery(Sku.class).eq(Sku::getSpuId, spuId);
        return this.baseMapper.selectList(wrapper);
    }
}
